/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Fenetre.BoutonListener;

import Fenetre.FenetreResultatRecherche;
import bdcgen.controleur.Controleur;
import bdcgen.controleur.Declencheur;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import modele.BonDeCommande;

/**
 *
 * @author gerard.dl02
 */
public class BouttonListenerGenerer implements ActionListener{

    private FenetreResultatRecherche fenetre;

    public BouttonListenerGenerer(FenetreResultatRecherche fenetre) {
        this.fenetre = fenetre;
    }
    
    
    
    @Override
    public void actionPerformed(ActionEvent ae) {
        
        BonDeCommande bon = fenetre.getListeBdC().get(fenetre.getSelectionBdC().getSelectedIndex());
        Controleur.getInstance().lancerScenario(new Declencheur(Declencheur.GENERER_ODT, bon));
        
        
    }
    
}
